Ternary 三元運算子


Posted by Rich on 2021-04-22

console.log(10 > 5 ? 'bigger' : 'smaller')
output:bigger

condition ? true : false
條件 ? true就執行 : false就執行


#note







Related Posts

滲透測試重新打底(2.1)--論Enumeration(枚舉)之DNS Enumeration

滲透測試重新打底(2.1)--論Enumeration(枚舉)之DNS Enumeration

swap用法

swap用法

來學 React 吧之七_React 實作留言板

來學 React 吧之七_React 實作留言板


Comments